.post.preview
  %h2.title
    = link_to publication.document.title, documents_publication_path(publication)
  %p.meta
    %span.date= l publication.created_at
    %span.posted
      опубликовал(а)
      = link_to publication.document.user.full_name, "#"
  .clearfix
  .img
    = link_to documents_publication_path(publication) do
      = image_tag publication.document.image.url(:thumb)
  .entry
    = entry publication.document.body
  .clearfix

  - tags = publication.document.tags
  - if tags.present?
    .box.light-gray
      .tags
        - links_for_tags(tags) do |tag|
          = tag
  .box.light-gray
    = link_to t('read_more'), documents_publication_path(publication), :class => "btn small primary"
    - if can? :publications_moderator
      = link_to t('edit'), edit_documents_publication_path(publication), :class => "btn small"

